<?php

namespace app\index\controller;

use app\common\CommonController;
use app\index\service\TemplateService;

class Template extends CommonController
{
    public function __construct(){
        parent::__construct();
    }
    public function index(){
        exitJson(TemplateService::getTemplateList($this->param));
    }
    public function create(){
        exitJson(TemplateService::create($this->param));
    }
    public function update(){
        exitJson(TemplateService::update($this->param));
    }
    public function delete(){
        checkParam($this->param,['e'],'id');
        exitJson(TemplateService::delete($this->param));
    }
}